glsharpentexfuncsgis
- Man Page
glSharpenTexFuncSGIS(3G) OpenGL Reference glSharpenTexFuncSGIS(3G)
NAME
glSharpenTexFuncSGIS - specify sharpen texture scaling function
C SPECIFICATION
void glSharpenTexFuncSGIS( GLenum target,
GLsizei n,
const GLfloat *points )
PARAMETERS
target The target to which the scaling function will be applied. Must
be one of GL_TEXTURE_1D, GL_TEXTURE_2D, or GL_TEXTURE_3D_EXT.
n The number of scaling function samples in points.
points An array of scaling function samples, each of which is a (level-
of-detail, function-value) pair.
DESCRIPTION
The sharpen texture extension defines three additional texture
magnification filters. These filters are selected by choosing one of the
values GL_LINEAR_SHARPEN_SGIS, GL_LINEAR_SHARPEN_ALPHA_SGIS, or
GL_LINEAR_SHARPEN_COLOR_SGIS for the current 1D, 2D, or 3D texture's
GL_TEXTURE_MAG_FILTER.
All three filters sample the level zero texture array exactly as it would
be sampled with filter mode GL_LINEAR. If both texture levels 0 and 1
are complete, the level 1 array of the texture is also linearly sampled,
just as though mipmap minification was being performed with LOD (the
level of detail parameter) valued near 1.0. If levels 0 and 1 are not
complete, it is as though the magnification texture filter was GL_LINEAR.
(Although querying the magnification filter value will return the value
as specified.)
The texture value computed from the level 0 array (T0) and the value
computed from the level one array (T1) are combined to compute the final
texture value (T):
T' = ((1 + F(LOD)) * T0) - (F(LOD) * T1)
T = 0 if T' < 0
T' if 0 <= T' <= 1
1 if T' > 1
glSharpenTexFuncSGIS is used to specify the scaling function F. target
must be GL_TEXTURE_1D, GL_TEXTURE_2D, or GL_TEXTURE_3D_EXT. n specifies
the number of pairs of values in points. points points to an array of
pairs of floating point values. The first value of each pair specifies a
value of LOD, and the second value of each pair specifies the
corresponding function value. The order in which the points are
Page 1
glSharpenTexFuncSGIS(3G) OpenGL Reference glSharpenTexFuncSGIS(3G)
specified is not significant. The n value pairs in points completely
specify the function, replacing any previous specification that may have
existed.
The function F is evaluated by fitting a curve through the sample points
specified in points. This curve may be linear between adjacent points,
or it may be smoothed, but it will pass exactly through the points,
limited only by the resolution of the implementation. The value pair
with the lowest LOD value specifies the function value F for all values
of LOD less than or equal to that pair's LOD. Likewise, the value pair
with the greatest LOD value specifies the function value F for all values
of LOD greater than or equal to that pair's LOD.
Since negative values of LOD correspond to magnification and positive
values correspond to minification, the points should have negative LOD
values (although specifying a positive value does not generate an error).
For example, an LOD of -4 corresponds to a magnification by a factor of
2**4, or 16. The default function points are (0,0) and (-4,1).
If the texture magnification filter is GL_LINEAR_SHARPEN_SGIS, then both
the color and the alpha components of T are computed as described in the
equations above. If the filter is GL_LINEAR_SHARPEN_COLOR_SGIS, then all
components of T other than alpha are computed as described above, and the
alpha component of T is computed as if the texture magnification filter
were GL_LINEAR. Finally, if the filter is GL_LINEAR_SHARPEN_ALPHA_SGIS,
the alpha component of T is computed as described in the equations above,
and all other components of T are computed as if the texture
magnification filter were GL_LINEAR.
ERRORS
GL_INVALID_ENUM is generated if target is not one of the allowable
values.
GL_INVALID_VALUE is generated if n is negative.
GL_INVALID_OPERATION is generated if glSharpenTexFuncSGIS is executed
between the execution of glBegin and the corresponding execution of
glEnd.
ASSOCIATED GETS
glGetTexParameter, glGetSharpenTexFuncSGIS.
MACHINE DEPENDENCIES
On RealityEngine, RealityEngine2, and VTX systems sharpen texturing may
not be used with 3D textures or when rendering to pixmaps.
The default scaling function is incorrect on InfiniteReality systems.
This will be fixed in a future release.
Page 2
glSharpenTexFuncSGIS(3G) OpenGL Reference glSharpenTexFuncSGIS(3G)
SEE ALSO
glTexImage1D, glTexImage2D, glTexImage3DEXT, glTexParameter,
glTexSubImage2DEXT.
Page 3